package com.miguo.framework.request;


import com.miguo.framework.utils.Log;

public abstract class CacheAbleRequestDefaultHandler<T1> implements CacheAbleRequestHandler<T1> {

    public void onCacheData(T1 data, boolean outOfDate) {
    }

    @Override
    public void onRequestFail(FailData failData) {
        if (failData != null && failData.getRequest() != null && failData.getRequest().getRequestData() != null) {
            Log.e("onRequestFail: %s", failData.getRequest().getRequestData().getRequestUrl());
        }
    }

    @Override
    public void onRequestFinish(T1 data) {
        Log.d("onRequestFinish: %s", data);
    }
}